﻿package  com.devilcat.ws{
	import com.devilcat.ws.Basicws;
	import com.worlize.websocket.*;
	
	public class Playerws extends Basicws{

		public function Playerws(protocol:String) {
			super(protocol);
			// constructor code
		}
		override function handleWebSocketMessage(event:WebSocketEvent):void
		{
			if (event.message.type === WebSocketMessage.TYPE_UTF8)
			{
				trace("Got message: " + event.message.utf8Data);
			}
			else if (event.message.type === WebSocketMessage.TYPE_BINARY)
			{
				trace("Got binary message of length " + event.message.binaryData.length);
			}
		}

	}
	
}
